<template>
	<view>
		
		<view class="top-box">
			<image src="/static/images/index/bg.png" class="bg-image"></image>
			<view class="top-body">
				<view class="flex justify-between">
					<view class="top-title">康德生活</view>
					<view class="top-right-box" @click="handleSearch('搜索你想要的商品、类目')">
						<view class="flex align-center">
							<text class="wlIcon-sousuo1"></text>
							<input placeholder="搜索你想要的商品、类目" class="top-input"/>
						</view>
						<view class="search-btn">搜索</view>
					</view>
				</view>
				
				<image src="/static/images/index/banner.png" class="swiper-image"></image>
			</view>
		</view>
		
		
		<view class="recommend-box">
			<view class="recommend-item" v-for="(item,index) in categoryList" :key="index">
				<image :src="item.image" class="recommend-image"></image>
				<text class="recommend-title">{{item.name}}</text>
			</view>
		</view>
		
		
		<view class="notice-box">
			<view class="flex align-center">
				<view class="flex align-center">
					<text class="notice-title1">通</text>
					<text class="notice-title2">知</text>
				</view>
				
				<view class="notice-content text-cut">研究新进展，(美人尖）项目上线正常</view>
			</view>
			
			<view class="wlIcon-fanhui2 colorgrey"></view>
		</view>
		
		
		<view>
			<image src="/static/images/index/ad.png" class="ad-image"></image>
		</view>
		
		
		<view class="hot-box">
			<image src="/static/images/index/hot_bg.png" class="hot-image"></image>
			
			<view class="hot-content-box">
				<view class="hot-title-main">礼包专区</view>
				
				<view class="hot-body">
					<view class="hot-item" v-for="(item,index) in dataList" :key="index">
						<image src="/static/images/index/ad.png" class="hot-shop-image"></image>
						<view class="hot-title">iPhone14pro</view>
						<view class="hot-price">¥7899</view>
					</view>
				</view>
				
			</view>
			
			<view class="hot-btn-boxs">
				<view class="hot-btn">
					<view class="hot-more-product">查看更多商品</view>
					<image src="/static/images/right.png" class="right-iamge"></image>
				</view>
			</view>
			
		 </view>
		 
		 
		<view class="about-box" @click="$wanlshop.to(`/pages/new/aboutus`)">
			<view class="about-left">
				<image src="/static/images/score_shop.png" class="about-image"></image>
			</view>
			<view class="about-right">
				<view class="about-title">关于康德生活</view>
				<view class="about-content text-cut-3">近年来，随着跨境电商贸易机制逐步完善、国际物流网络持续疏通，我国跨境电商渠道加</view>
			</view>
		</view>
	
		 
		<view class="recommend-product">
			<view class="recommend-line"></view>
			<view class="recommend-title2">热销产品</view>
			<view class="recommend-line"></view>
		</view> 
		
		<view class="product-list">
			<view class="product-item" v-for="(item,index) in dataList" :key="index">
				<image src="/static/images/score_shop.png" class="product-image"></image>
				<view class="product-title text-cut">热销产品</view>
				<view class="product-price">¥19.99</view>
			</view>
		</view>
	
		
	</view>
</template>



<script>
export default {
	data() {
		return {
			dataList:[{},{},{},{},{},{},{}],
			categoryList:[
				{
					image:'/static/images/index/1.png',
					name:'业主专区',
					path:'',
				},
				{
					image:'/static/images/index/2.png',
					name:'美妆专区',
					path:'',
				},
				{
					image:'/static/images/index/3.png',
					name:'健康专区',
					path:'',
				},
				{
					image:'/static/images/index/4.png',
					name:'生活专区',
					path:'',
				},
			],
		}
	},
	onLoad() {
		
	},
	methods: {
		// 搜索
		handleSearch(text) {
			this.$wanlshop.to(`/pages/page/search?type=goods&keywords=${text}`, 'fade-in', 100);
		},
	}
}		
</script>

<style>
page{
	overflow-x: hidden;
}
</style>

<style lang="scss" scoped>
.bg-image{
	width: 750rpx;
	height: 520rpx;
}	

.top-body{
	position: absolute;
	top: 88rpx;
	width: 100%;
	padding: 0rpx 26rpx;
}	

.top-title{
	font-size: 44rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #FEFEFE;
}

.top-right-box{
	width: 540rpx;
	height: 60rpx;
	background: #F7F7F7;
	border-radius: 30rpx;
	display: flex;
	align-items: center;
	padding-left: 18rpx;
	justify-content: space-between;
	padding-right: 4rpx;
}

.top-input{
	margin-left: 12rpx;
}
.search-btn{
	width: 112rpx;
	height: 54rpx;
	background: #366BEB;
	border-radius: 26rpx;
	font-size: 26rpx;
	font-family: PingFang SC;
	font-weight: 400;
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
}

.swiper-image{
	width: 702rpx;
	height: 300rpx;
	margin-top: 40rpx;
}

.recommend-box{
	margin-top: 0rpx;
	margin-bottom: 39rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0rpx 39rpx;
}

.recommend-item{
	width: 25%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.recommend-image{
	width: 104rpx;
	height: 116rpx;
}

.recommend-title{
	font-size: 28rpx;
	font-family: PingFang SC;
	font-weight: 400;
	color: #333333;
}

.colorgrey{
	colore: #8D8D8D;
}

.notice-box{
	width: 702rpx;
	height: 72rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	display:flex;
	justify-content: space-between;
	padding: 0rpx 34rpx;
	align-items: center;
	margin-left: 24rpx;
}

.notice-title1{
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #333333;
}

.notice-title2{
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #366BEB;
}

.notice-content{
	font-size: 26rpx;
	font-family: PingFang SC;
	font-weight: 300;
	color: #999999;
	margin-left: 21rpx;
	width: 550rpx;
}

.ad-image{
	width: 702rpx;
	height: 155rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	margin: 20rpx 24rpx;
}

.hot-image{
	width: 702rpx;
	height: 525rpx;
	margin: 0rpx 24rpx;
}

.hot-title-main{
	font-size: 36rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #FFFFFF;
	padding: 37rpx 0rpx 31rpx 29rpx;
}

.hot-box{
	position: relative;
}

.hot-content-box{
	position: absolute;
	top: 0rpx;
	left: 0rpx;
	width: 100%;
	margin: 0rpx 24rpx;
}

.hot-shop-image{
	width: 139rpx;
	height: 171rpx;
	margin-top: 22rpx;
}

.hot-title{
	font-size: 26rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #333333;
	margin-top: 41rpx;
}

.hot-price{
	font-size: 24rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #F53938;
	margin-top: 13rpx;
	padding-bottom: 20rpx;
}

.hot-item{
	width: 214rpx;
	height: 311rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-right: 12rpx;
	flex-shrink: 0;
}

.hot-body{
	padding-left: 12rpx;
	width: 100%;
	display: flex;
	overflow-x: scroll;
	width: 702rpx;
}

.hot-more-product{
	font-size: 26rpx;
	font-family: PingFang SC;
	font-weight: 400;
	color: #FFFFFF;
	margin-right: 6rpx;
}

.right-iamge{
	width: 24rpx;
	height: 24rpx;
	border-radius: 50%;
}

.hot-btn{
	width: 224rpx;
	height: 52rpx;
	border: 2px solid #FFFFFF;
	border-radius: 26rpx;
	display:flex;
	align-items: center;
	justify-content: center;
	margin-top: 30rpx;
}

.hot-btn-boxs{
	position: absolute;
	bottom: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.about-box{
	width: 702rpx;
	height: 232rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	margin-top: 20rpx;
	margin-left: 24rpx;
	display: flex;
	padding: 16rpx;
}

.about-image{
	width: 240rpx;
	height: 200rpx;
	border-radius: 20rpx;
	margin-right: 29rpx;
}

.about-title{
	font-size: 32rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #333333;
}

.about-content{
	font-size: 26rpx;
	font-family: PingFang SC;
	font-weight: 400;
	color: #808080;
	line-height: 40rpx;
	margin-top: 20rpx;
}

.recommend-product{
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 42rpx;
	margin-bottom: 33rpx;
}

.recommend-line{
	width: 119rpx;
	height: 2rpx;
	border: 2px solid #366BEB;
}

.recommend-title2{
	font-size: 36rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #333333;
	margin-left: 31rpx;
	margin-right: 31rpx;
}

.product-list{
	display:flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-left: 24rpx;
	margin-right: 24rpx;
}

.product-item{
	width: 341rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	margin-bottom: 33rpx;
	padding-bottom: 20rpx;
}

.product-image{
	width: 341rpx;
	height: 341rpx;
	border-top-left-radius: 20rpx;
	border-top-right-radius: 20rpx;
}

.product-title{
	font-size: 26rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #333333;
	margin-top: 20rpx;
	padding-left: 20rpx;
}

.product-price{
	font-size: 32rpx;
	font-family: PingFang SC;
	font-weight: 700;
	color: #F53938;
	margin-top: 20rpx;
	padding-left: 20rpx;
}
</style>